<template>
<div>
    <div class="head">
        <div class="jhead">
            <router-link to="/era">
                <van-icon class="jtz" name="arrow-left" />
            </router-link>
            <p>童趣一夏</p>
            <div class="head-rigth">
                <router-link to="/shop">
                    <van-icon class="van1" name="cart-o" />
                </router-link>
                <van-icon class="van1" name="share-o" @click="showShare = true"/>
            </div>
        </div>
    </div>
    <div class="shop">
        <div class="shop-head">
            <h1>实时热抢</h1>
            <p>今日必抢</p>
        </div>
        <ul>
            <li v-for="(v,i) in data" :key="i">
                <img :src="v.img" alt="">
                <h1>新人价</h1>
                <h2>{{v.texta}}</h2>
                <div class="li-bottom">
                    <div class="bottom-left">
                        <p><b>{{v.numa}}</b>{{v.numb}}</p>
                        <del>{{v.numc}}</del>
                    </div>
                    <div class="bottom-rigth">
                        <a href="">
                            <van-icon name="cart-o" />
                        </a>
                    </div>
                </div>
            </li>
        </ul>
        <van-share-sheet
            v-model="showShare"
            title="立即分享给好友"
            :options="options"
        />
    </div>
</div>
</template>

<script>
export default {
    props:{
        data:Array
    },
    data(){
        return{
            showShare: false,
            options: [
                [
                    { name: '微信', icon: 'wechat' },
                    { name: '朋友圈', icon: 'wechat-moments' },
                    { name: '微博', icon: 'weibo' },
                    { name: 'QQ', icon: 'qq' },
                    {name: '火火火',icon: 'https://img01.yzcdn.cn/vant/custom-icon-fire.png',},
                ],
                [
                    { name: '复制链接', icon: 'link' },
                    { name: '分享海报', icon: 'poster' },
                    { name: '二维码', icon: 'qrcode' },
                    { name: '小程序码', icon: 'weapp-qrcode' },
                ],
            ],
        }
    }
}
</script>

<style scoped> 
    div{
        width: 100%;
        height: 100%;
    }
    .head{
        width: 100%;
        height: 2.5rem;
        background: url(/image/Sort/14.jpg) no-repeat;
        background-size: 100% 100%;
        display: flex;
    }
    .jhead{
        width: 100%;
        height: 0.3rem;
        /* background-color: beige; */
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        z-index: 1000;
    }
    .jtz{
        font-size: 0.2rem;
        margin-left: 0.2rem;
    }
    .jhead>p{
        color: white;
        font-size: 0.15rem;
        font-weight: bold;
        position: absolute; 
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
    }
    .head-rigth{
        width: 0.6rem;
        height: 100%;
        /* background-color: aquamarine; */
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-right: 0.15rem;
    }
    .van1{
        font-size: 0.23rem;
        color: black;
    }
    .shop{
        width: 100%;
        height: 2.675rem;
        background-color: white;
    }
    .shop-head{
        width: 100%;
        height: 15%;
        display: flex;
        /* background-color: blue; */
        align-items: flex-end;
        /* margin-top: 0.15rem; */
    }
    .shop-head>h1{
        font-size: 0.18rem;
        font-family: "黑体";
        margin-left: 0.34rem;
        margin-right: 0.2rem;
    }
    .shop-head>p{
        width: 0.6rem;
        height: 0.17rem;
        border: 1px solid #ea4237;
        border-radius: 50px;
        text-align: center;
        line-height: 0.17rem;
        color: #ea4237;
    }
    .shop>ul{
        width: 100%;
        height: 85%;
        /* background-color: blueviolet; */
        display: flex;
        align-items: flex-end;
        justify-content: space-evenly;
    }
    .shop>ul>li{
        width: 1.05rem;
        height: 85%;
        background-color: white;
        position: relative;
        /* flex: 1; */
        margin-bottom: 0.1rem;
    }
    .shop>ul>li>img{
        width: 100%;
    }
    .shop>ul>li>h1{
        width: 0.4rem;
        height: 0.15rem;
        background-color: #ea4237;
        border-radius: 3px;
        color: white;
        font-size: 0.1rem;
        text-align: center;
        line-height: 0.15rem;
        font-weight: normal;
    }
    .shop>ul>li>h2{
        width: 1.05rem;
        font-size: 0.125rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .li-bottom{
        width: 100%;
        height: 0.275rem;
        /* background-color: rgb(219, 185, 251); */
        display: flex;
        position: absolute;
        bottom: 0;
    }
    .bottom-left{
        width: 50%;
        height: 100%;
        /* background-color: bisque; */
    }
    .bottom-left>p{
        color: #bababa;
        font-size: 0.1rem;
    }
    .bottom-left>p>b{
        color: #ea4237;
    }
    .bottom-left>del{
        color: #bababa;
        font-size: 0.08rem;
    }
    .bottom-rigth{
        width: 50%;
        height: 100%;
        /* background-color: aquamarine; */
        display: flex;
        justify-content: flex-end;
    }
    .bottom-rigth>a{
        display: inline-block;
        width: 0.265rem;
        height: 0.265rem;
        background-color: #ea4237;
        border-radius: 50%;
        font-size: 0.16rem;
        color: white;
        text-align: center;
        line-height: 0.32rem;
    }
    .van-popup{
        height: 42%;
    }
    .van-popup>.van-share-sheet__options{
        justify-content: space-evenly;
    }
</style>